﻿using System;
using System.Data;

namespace WinFormClient
{
    public class Method
    {
        private string _returnType;
        private string _methodName;
        private string _statementName;
        private string _parameterType = null;
        private string _parameterName = null;
        private DataAccessMethod _accessMethod = DataAccessMethod.ExecuteQueryForObject;

        public Method(string returnType, string methodName, string statementName, string parameterType, string parameterName, DataAccessMethod accessMethod)
        {
            this._returnType = returnType;
            this._methodName = methodName;
            this._statementName = statementName;
            this._parameterType = parameterType;
            this._parameterName = parameterName;
            this._accessMethod = accessMethod;
        }

        public string ReturnType
        {
            get
            {
                return this._returnType;
            }
            set
            {
                this._returnType = value;
            }
        }

        public string MethodName
        {
            get
            {
                return this._methodName;
            }
            set
            {
                this._methodName = value;
            }
        }

        public string StatementName
        {
            get
            {
                return this._statementName;
            }
            set
            {
                this._statementName = value;
            }
        }

        public string ParameterType
        {
            get
            {
                return this._parameterType;
            }
            set
            {
                this._parameterType = value;
            }
        }

        public string ParameterName
        {
            get
            {
                return this._parameterName;
            }
            set
            {
                this._parameterName = value;
            }
        }

        public DataAccessMethod AccessMethod
        {
            get
            {
                return this._accessMethod;
            }
            set
            {
                this._accessMethod = value;
            }
        }
    }

    public enum DataAccessMethod
    {
        ExecuteQueryForList,
        ExecuteQueryForObject,
        ExecuteInsert,
        ExecuteUpdate,
        ExecuteDelete
    }
}
